package com.itheima.service.system;

import com.github.pagehelper.PageInfo;
import com.itheima.domain.system.Role;
import com.itheima.domain.system.SystemSet;
import com.itheima.domain.system.User;


import java.util.List;

public interface UserService {
    // 2021/10/15 start by guowenliang
    boolean findUser(User user);    // 登录查找用户

    void register(User user);       // 注册用户
    // 2021/10/15 end by guowenliang

    //添加数据
    void save(User user);

    //删除数据
    void delete(String id);

    //修改数据
    void updateUser(User user);

    //查询单条数据
    User findById(String id);

    //查询所有
    List<User> findAll();

    //分页查询
    PageInfo findByPage(String num, String pageNum);

    String getCode(String phone);

    List<User> findUserAndRole(String userId);

    List<Role> userRoleList(String userId);

    void updateRole(String[] roleIds, String userId);

    User findUserByUsername(String userName);

    void UploadPicture(User user);

    User findUserAndPassword( String username,  String password);


    void updatePassword( String username, String password);

    User findUserByNameAndEmail(String username,  String email);

    void updatePasswordByNameAndEmail(String username, String email,String password);


    PageInfo findUserByCondition(String pageNum,String pageSize,String searchUserName, String searchEmail, String searchDept, String searchState, String searchGender);

    List<SystemSet> findSystemSet();

    void updatePageSize(String moduleName, String moduleNamePageSize);

    SystemSet findSystemSetByModuleName(String moduleName);
}
